<template>
   <div id="yousportIndex">

       <div class="yousport-index-img"></div>

        <div class="start-btn">
            <mt-button size="large" type="primary" @click="enable" class="yousport-start-btn">开启友运动</mt-button>
        </div>
   </div>
</template>

<script>
    import config from '../assets/config'
    export default {
        data () {
            return {}
        },
        methods: {
            goPerRanking(){
                this.$router.push('/personalRanking')
            },
            enable() {
                this.$http.post(config.host + config.enable).then((res)=>{
                    if(!res.code) {
                        let disable = this.$route.query.disable;
                        if(disable){
                            this.$router.push('/personalRanking?disable=true');
                        } else {
                            this.$router.push('/personalRanking');
                        }
                        
                    }

                })
            }
        },
        created(){
            yyesn.client.configNavBar(function () {

            }, {
                'backgroundColor': '#ffffff',
                'tintColor': '#262626',
                'hide': 1,
                'fullScreen':1,
                'centerItems':[{
                    title:''
                }]
            })
        }
    }
</script>

<style>
    .yousport-index-img{
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background-size: cover;
        margin: 0;
        padding: 0;
        z-index: 99;
        background-image: url("../assets/img/start6.jpg");
    }

    .start-btn{
        position: absolute;
        bottom: 30px;
        height: 45px;
        left: 28px;
        right: 28px;
    }
    .yousport-start-btn{
        font-size: 16px;
        color: #fff;
        background-color: #29B6F6;
        z-index: 100;
        height: 45px;
    }

    @media (max-device-height: 568px) {
        .yousport-index-img {
            background-image: url('../assets/img/start5.jpg');
        }
    }
    @media (min-device-height: 736px) {
        .yousport-index-img {
            background-image: url('../assets/img/start6p.jpg');
        }
    }
    .mint-button{
        border-radius: 4px;
    }
</style>